package com.ruoyi.cms.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.cms.mapper.SysCmsFeedbackMapper;
import com.ruoyi.cms.domain.SysCmsFeedback;
import com.ruoyi.cms.service.ISysCmsFeedbackService;

/**
 * 反馈Service业务层处理
 * 
 * @author he
 * @date 2025-06-24
 */
@Service
public class SysCmsFeedbackServiceImpl implements ISysCmsFeedbackService 
{
    @Autowired
    private SysCmsFeedbackMapper sysCmsFeedbackMapper;

    /**
     * 查询反馈
     * 
     * @param id 反馈主键
     * @return 反馈
     */
    @Override
    public SysCmsFeedback selectSysCmsFeedbackById(Long id)
    {
        return sysCmsFeedbackMapper.selectSysCmsFeedbackById(id);
    }

    /**
     * 查询反馈列表
     * 
     * @param sysCmsFeedback 反馈
     * @return 反馈
     */
    @Override
    public List<SysCmsFeedback> selectSysCmsFeedbackList(SysCmsFeedback sysCmsFeedback)
    {
        return sysCmsFeedbackMapper.selectSysCmsFeedbackList(sysCmsFeedback);
    }

    /**
     * 新增反馈
     * 
     * @param sysCmsFeedback 反馈
     * @return 结果
     */
    @Override
    public int insertSysCmsFeedback(SysCmsFeedback sysCmsFeedback)
    {
        sysCmsFeedback.setCreateTime(DateUtils.getNowDate());
        return sysCmsFeedbackMapper.insertSysCmsFeedback(sysCmsFeedback);
    }

    /**
     * 修改反馈
     * 
     * @param sysCmsFeedback 反馈
     * @return 结果
     */
    @Override
    public int updateSysCmsFeedback(SysCmsFeedback sysCmsFeedback)
    {
        return sysCmsFeedbackMapper.updateSysCmsFeedback(sysCmsFeedback);
    }

    /**
     * 批量删除反馈
     * 
     * @param ids 需要删除的反馈主键
     * @return 结果
     */
    @Override
    public int deleteSysCmsFeedbackByIds(Long[] ids)
    {
        return sysCmsFeedbackMapper.deleteSysCmsFeedbackByIds(ids);
    }

    /**
     * 删除反馈信息
     * 
     * @param id 反馈主键
     * @return 结果
     */
    @Override
    public int deleteSysCmsFeedbackById(Long id)
    {
        return sysCmsFeedbackMapper.deleteSysCmsFeedbackById(id);
    }
}
